<p>
  You have {{this_user_checkins.length }} checkins.
  {% with other_user as user %}
    {% include "user.snippet" %}
  {% endwith %}
  has {{other_user_checkins.length }} checkins. It looks like you were at
  {{ intersection|length }} places together.
</p>

{% for this_user_checkin, other_user_checkin, venue in intersection %}
  {% ifchanged this_user_checkin.display_date %}
    <h2 class="date-header">
      {% ifchanged this_user_checkin.display_year %}
        <div class="year">{{ this_user_checkin.display_year }}</div>
      {% else %}
        <div class="year" style="display: {% cycle none,none,none,none,block %}">{{ this_user_checkin.display_year }}</div>
      {% endifchanged %}
      {{ this_user_checkin.display_short_date }}
    </h2>
  {% endifchanged %}
  <table class="details">
    <tr>
      <td rowspan="2" class="icon">
        <img src="{{ venue.icon }}" width="32" height="32" alt="">
      </td>
      <td>
        <a href="https://foursquare.com/venue/{{ venue.venue_id }}" class="venue">{{ venue.name }}</a>
        at
        <a href="https://foursquare.com/user/{{this_user.foursquare_id }}/checkin/{{ this_user_checkin.id }}">{{ this_user_checkin.display_time }}</a>
        and
        <a href="https://foursquare.com/user/{{other_user.foursquare_id }}/checkin/{{ other_user_checkin.id }}">{{ other_user_checkin.display_time }}</a>.
      </td>
    </tr>
    <tr>
      <td class="location">
        {% if venue.has_location %}
          {% if venue.has_location_url %}
            <a href="{{ venue.location_url }}" target="_blank">{{ venue.display_location }}</a>
          {% else %}
            {{ venue.display_location }}
          {% endif %}
        {% endif %}
      </td>
    </tr>
  </table>
{% endfor %}

<div id="intersection-footer">
  <p>
    Neat, huh? If you'd like to have others intersect with your Foursquare
    checkins, just give them this link (you can also
    <a href="https://twitter.com/?status={{ tweet_text }}" target="_blank">tweet
    it</a>):
  </p>

  <p><a href="{{ short_url }}">{{ short_url }}</a></p>

  <p>
    The <a href="/">homepage</a> will show people who've recently intersected
    their checkins with yours.
  </p>
</div>
